<?php
// +----------------------------------------------------------------------
// | KITEGO-Admin「开箱即用」「人人全栈」
// +----------------------------------------------------------------------
// | Copyright (c) 2016~2024 https://www.kitego.cn All rights reserved.
// +----------------------------------------------------------------------
// | Licensed KITEGO并不是自由软件，未经许可不能去掉KITEGO相关版权
// +----------------------------------------------------------------------
// | Author: KITEGO Team <bd@kitego.cn>
// +----------------------------------------------------------------------

use think\facade\Route;

Route::group('maintenance', function () {

    // 无需登录
    Route::group(function () {
        Route::get('lang-translation/json', 'v1.maintenance.LangTranslationController/listTranslationJson')->option(['realName' => '语言翻译包']);
    })->option(['parent' => 'maintenance', 'cateName' => '维护模块']);

    // 需要登录
    Route::group(function () {

        Route::group('lang', function () {
            Route::get('list', 'v1.maintenance.LangController/list')->option(['realName' => '语言列表']);
            Route::post('edit', 'v1.maintenance.LangController/edit')->option(['realName' => '编辑语言']);
            Route::post('batch-del', 'v1.maintenance.LangController/batchDel')->option(['realName' => '批量删除']);
        })->option(['parent' => 'setting', 'cateName' => '语言模块']);

        Route::group('lang-country', function () {
            Route::get('list', 'v1.maintenance.LangCountryController/list')->option(['realName' => '地区列表']);
            Route::post('edit', 'v1.maintenance.LangCountryController/edit')->option(['realName' => '编辑地区']);
            Route::post('batch-del', 'v1.maintenance.LangCountryController/batchDel')->option(['realName' => '批量删除']);
        })->option(['parent' => 'setting', 'cateName' => '地区模块']);

        Route::group('lang-translation', function () {
            Route::get('list', 'v1.maintenance.LangTranslationController/list')->option(['realName' => '翻译列表']);
            Route::post('edit', 'v1.maintenance.LangTranslationController/edit')->option(['realName' => '编辑翻译']);
            Route::post('batch-del', 'v1.maintenance.LangTranslationController/batchDel')->option(['realName' => '批量删除']);
            Route::post('robot-translate', 'v1.maintenance.LangTranslationController/robotTranslate')->option(['realName' => '机器翻译']);
        })->option(['parent' => 'setting', 'cateName' => '翻译模块']);

        Route::get('dev-tools/edit-parse', 'v1.maintenance.DevToolsController/editParse')->option(['realName' => '获取PHP代码']);

    })->option(['parent' => 'maintenance', 'cateName' => '维护模块']);

})->middleware([])->option(['mark' => 'maintenance', 'markName' => '维护模块']);
